import { Global } from '../Global';
import { Entity } from './def/Entity';

export class AbilityStone extends Entity {

    private _power: number = 20

    handleEvent() {
        const state = {
            move: true,
            cartoon: false
        }

        // 增加能力
        Global.hero._heroState.fight[this.type] += this._power
        Global.em.removeEntity(Global.fm.getFloor(), this)

        // 提示
        const title = this.type === 'atk' ? '攻击力' : '防御力'
        Global.popUtil.popUp(title + '增加' + this._power + '点')
        return state
    }

}

